package ubiqweb.spring3.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import ubiqweb.spring3.dao.AttendeesDao;
import ubiqweb.spring3.model.Attendees;

@Service("attendeesService")
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class AttendeesServiceImpl implements AttendeesService {
	
	@Autowired
	private AttendeesDao attendeesDao;
	
	@Transactional
	public List<Attendees> listAttendees(String trainingId){
		return attendeesDao.listAttendees(trainingId);
	}	
	
	@Transactional
	public List<Attendees> listMyTrainings(String userId){
		return attendeesDao.listMyTrainings(userId);
	}	
}